/****** Object:  Stored Procedure [dbo].spSanPhamInsert Script Date: 6/11/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spSanPhamInsert]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spSanPhamInsert]
GO

/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		13/06/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spSanPhamInsert]
(
	@MaThuoc nvarchar(12),
	@TenHoatChat nvarchar(100),
	@TenBietDuoc nvarchar(100),
	@NongDoHamLuong nvarchar(100),
	@DangBaoChe nvarchar(150),
	@QuyCach nvarchar(100),
	@SoDangKy nvarchar(20),
	@XuatXu nvarchar(30),
	@NhaSX nvarchar(50),
	@NhaNK nvarchar(50),
	@GhiChu nvarchar(200),
	@MaDonVi nvarchar(6),
	@MaNH nvarchar(4)
)
WITH ENCRYPTION

AS

SET NOCOUNT ON

INSERT INTO [tbl_SanPham]
(
	[MaThuoc],
	[TenHoatChat],
	[TenBietDuoc],
	[NongDoHamLuong],
	[DangBaoChe],
	[QuyCach],
	[SoDangKy],
	[XuatXu],
	[NhaSX],
	[NhaNK],
	[GhiChu],
	[MaDonVi],
	[MaNH]
)
VALUES
(
	@MaThuoc,
	@TenHoatChat,
	@TenBietDuoc,
	@NongDoHamLuong,
	@DangBaoChe,
	@QuyCach,
	@SoDangKy,
	@XuatXu,
	@NhaSX,
	@NhaNK,
	@GhiChu,
	@MaDonVi,
	@MaNH
)
GO

--GRANT EXECUTE ON [dbo].[spSanPhamInsert] TO [sa]
--GO
